<template>
  <div class="cinemas-component" @click="abc">
    <div class="cinemas-addname">
      <span class="cinemas-name"> {{ $attrs.nm }} </span>
      <span class="cinemas-name"> {{ $attrs.name }} </span>
      <span class="cinemas-pr" v-if="$attrs.sellPrice"
        ><i class="price">{{ $attrs.sellPrice }}</i
        >元起</span
      >
    </div>
    <div class="cinemas-add-km">
      <span class="cinemas-address"> {{ $attrs.addr }} </span>
      <span class="cinemas-distance"> {{ $attrs.distance }} </span>
    </div>
    <div class="tag" v-if="$attrs.tag">
      <span class="tagblue" v-if="$attrs.tag.allowRefund">退</span>
      <span class="tagblue" v-if="$attrs.tag.endorse">改签</span>
      <span class="tagyellow" v-if="$attrs.tag.snack">小吃</span>
      <span class="tagyellow" v-if="$attrs.tag.vipTag">{{
        $attrs.tag.vipTag
      }}</span>
      <span class="tagblue" v-for="(item, i) in $attrs.tag.hallType" :key="i">{{
        item
      }}</span>
      <!-- <span class="tagblue">DTS:X 临镜音厅</span> -->
    </div>
    <div class="tag" v-if="$attrs.labels">
      <span v-for="(item, i) in $attrs.labels" class="tagblue" :key="i">{{
        item.name
      }}</span>
    </div>
    <div v-if="$attrs.promotion.cardPromotionTag">
      <span class="ka">卡</span>
      <span class="kaika">{{ $attrs.promotion.cardPromotionTag }}</span>
    </div>
    <div v-if="$attrs.showTimes">
      <span class="kaika">{{ $attrs.showTimes }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "CinemasComponent",
  inheritAttrs: false,
  methods: {
    abc() {
      this.$router.push({ name: "move" });
    },
  },
};
</script>

<style scoped lang="scss">
.cinemas-component {
  width: 100%;
  min-height: 100px;
  background-color: #fff;
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid #ccc;
  .cinemas-addname {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    .cinemas-name {
      color: #000;
    }
    .cinemas-pr {
      color: #f03d37;
      font-size: 12px;

      .price {
        font-size: 18px;
        margin: 0 3px;
        font-style: normal;
      }
    }
  }
  .cinemas-add-km {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 13px;
    margin-top: 8px;
  }
  .cinemas-address {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
  .tag {
    margin: 4px 0;
    .tagblue {
      color: #589daf;
      border: 1px solid #589daf;
      padding: 0 3px;
      font-size: 12px;
      margin-right: 3px;
      border-radius: 3px;
    }
    .tagyellow {
      color: #f90;
      border: 1px solid #f90;
      font-size: 12px;
      padding: 0 3px;
      margin-right: 3px;
      border-radius: 3px;
    }
  }
  .ka {
    background-color: rgb(11, 101, 204);
    font-size: 12px;
    color: #fff;
    border-radius: 1px;
    padding: 0 2px;
  }
  .kaika {
    color: #999;
    font-size: 12px;
  }
}
</style>
